/**
 *  Copyright (C) 2010:
 *                 Buzzanca Marco <marco.bzn@gmail.com>
 *         Monaco Davide Giuseppe <black.ralkass@gmail.com>
 *              Petralia Veronica <veronicapetralia@gmail.com>
 *
 * This file is part of DS2011BMP
 *
 * DS2011BMP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DS2011BMP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * @file workernetwork.h
 * @author Veronica Petralia
 *
 * This file contains WorkerNetwork class declaration. 
 */

#ifndef _WORKERNETWORK_H_
#define _WORKERNETWORK_H_ 1

#include <vector>
#include "address.h"

class WorkerNetwork
{
	private:
    /**
     * @brief Container of Worker Addresses.
     */
		std::vector<Address> _workers;
	public:
    /**
     * @brief Default Constructor.
     */
		WorkerNetwork(void);

    /**
     * @brief Destructor.
     */
		~WorkerNetwork(void);

    /**
     * @brief Add the provided Address associated to a Worker to the 
     * current WorkerNetwork. 
     *
     * @param val provided Worker's Address.
     */
		void addWorker(const Address& val);

    /**
     * @brief Return the Address of the i-th Worker in the WorkerNetwork.
     * @param i Index of the Worker in _workers.
     * @return The Address of the Worker in the WorkerNetwork in position i.
     */
		const Address& getWorker(int i) const;

    /**
     * @brief Return the current size of the WorkerNetwork.
     * @return The size of the WorkerNetwork.
     *
     * Actually the size returned is Address container's one.
     */
		size_t size(void) const;
};

#endif
